import base64
import json
import time

import requests
# response = requests.get('http://99.8.10.51:50009/query/e')
# print(response.status_code)

ts = int(time.strftime("%H", time.localtime()))
print(ts)
response = requests.get('http://99.8.10.51:50009/personal_income_tax/{\"wait_task\":\"0\",'
                                '\"comany_name\":\"重庆飞驶特人力资源管理有限公司万州分公司\"}')
s = time.strftime("%Y-%m-%d %H:%M:%S", time.localtime())

re = json.loads(response.text)


x = re['messages']['file_data']

u = x.encode()
y = base64.decodebytes(u)
f = open(r'D:\xgx.xlsx', 'wb')
f.write(y)

